<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;

class BaseController extends Controller
{
    public $user = null;
    
    public function __construct(Request $request)
    {
//        $token = $request->header('X-AUTHTOKEN');
//        // 根据token 找到对应用户
//        $user = User::where('token', $token)->first();
//
//        //记录用户信息
        $this->user = $request->user();
    }

    
}
